package nav

/*
#include<stdint.h>
#include<stdbool.h>
extern void nav_dtNavMeshCreateParams_Delete(void * c_this);
extern void nav_dtNavMeshCreateParams_DeleteArray(void * c_this);
extern void* nav_NewdtNavMeshCreateParams();
extern void * nav_dtNavMeshCreateParams_GetPtrToBmax(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToBmin(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToBuildBvTree(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToCh(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToCs(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToDetailMeshes(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToDetailTriCount(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToDetailTris(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToDetailVerts(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToDetailVertsCount(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToNvp(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToOffMeshConAreas(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToOffMeshConCount(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToOffMeshConDir(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToOffMeshConFlags(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToOffMeshConRad(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToOffMeshConUserID(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToOffMeshConVerts(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToPolyAreas(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToPolyCount(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToPolyFlags(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToPolys(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToTileLayer(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToTileX(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToTileY(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToUserId(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToVertCount(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToVerts(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToWalkableClimb(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToWalkableHeight(void * c_this);
extern void * nav_dtNavMeshCreateParams_GetPtrToWalkableRadius(void * c_this);
extern void * nav_dtNavMeshCreateParams_IndexArray(void * c_this,long n);
extern bool nav_dtCreateNavMeshData(void * params,void * outData,void * outDataSize);
extern bool nav_dtNavMeshDataSwapEndian(void * data,int dataSize);
extern bool nav_dtNavMeshHeaderSwapEndian(void * data,int dataSize);
extern void * nav_NewDtNavMeshCreateParamsPtrArray(long n);

*/
import "C"
import "unsafe"
import "gitee.com/hasika/cgo"

var _ unsafe.Pointer
var _ cgo.NotUsed

/*
Represents the source data used to build an navigation mesh tile.

	detour
*/
type DtNavMeshCreateParamsPtr uintptr

/*
public void Delete()
*/
func (p DtNavMeshCreateParamsPtr) Delete() {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	C.nav_dtNavMeshCreateParams_Delete(wrap_this)
}

/*
void DeleteArray()
*/
func (p DtNavMeshCreateParamsPtr) DeleteArray() {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	C.nav_dtNavMeshCreateParams_DeleteArray(wrap_this)
}

/*
public dtNavMeshCreateParams()
*/
func NewDtNavMeshCreateParams() cgo.GoManagedPtr[DtNavMeshCreateParamsPtr] {
	wrap_out := C.nav_NewdtNavMeshCreateParams()
	go_out := cgo.MakePtr[cgo.GoManagedPtr[DtNavMeshCreateParamsPtr]](uintptr(wrap_out))
	return go_out
}

/*
The maximum bounds of the tile. [(x, y, z)] [Unit: wu]

public float(*)[3] GetPtrToBmax()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToBmax() *[3]float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToBmax(wrap_this)
	go_out := (*[3]float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The minimum bounds of the tile. [(x, y, z)] [Unit: wu]

public float(*)[3] GetPtrToBmin()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToBmin() *[3]float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToBmin(wrap_this)
	go_out := (*[3]float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
True if a bounding volume tree should be built for the tile.

@note The BVTree is not normally needed for layered navigation meshes.

public bool * GetPtrToBuildBvTree()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToBuildBvTree() *bool {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToBuildBvTree(wrap_this)
	go_out := (*bool)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The y-axis cell height of the polygon mesh. [Limit: > 0] [Unit: wu]

public float * GetPtrToCh()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToCh() *float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToCh(wrap_this)
	go_out := (*float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The xz-plane cell size of the polygon mesh. [Limit: > 0] [Unit: wu]

public float * GetPtrToCs()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToCs() *float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToCs(wrap_this)
	go_out := (*float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The height detail sub-mesh data. [Size: 4 * #polyCount]

public unsigned int const * * GetPtrToDetailMeshes()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToDetailMeshes() **uint32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToDetailMeshes(wrap_this)
	go_out := (**uint32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The number of triangles in the detail mesh.

public int * GetPtrToDetailTriCount()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToDetailTriCount() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToDetailTriCount(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The detail mesh triangles. [Size: 4 * #detailTriCount]

public unsigned char const * * GetPtrToDetailTris()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToDetailTris() **uint8 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToDetailTris(wrap_this)
	go_out := (**uint8)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The detail mesh vertices. [Size: 3 * #detailVertsCount] [Unit: wu]

public float const * * GetPtrToDetailVerts()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToDetailVerts() **float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToDetailVerts(wrap_this)
	go_out := (**float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The number of vertices in the detail mesh.

public int * GetPtrToDetailVertsCount()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToDetailVertsCount() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToDetailVertsCount(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
Number maximum number of vertices per polygon. [Limit: >= 3]

public int * GetPtrToNvp()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToNvp() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToNvp(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
User defined area ids assigned to the off-mesh connections. [Size: #offMeshConCount]

public unsigned char const * * GetPtrToOffMeshConAreas()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToOffMeshConAreas() **uint8 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToOffMeshConAreas(wrap_this)
	go_out := (**uint8)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The number of off-mesh connections. [Limit: >= 0]

public int * GetPtrToOffMeshConCount()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToOffMeshConCount() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToOffMeshConCount(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The permitted travel direction of the off-mesh connections. [Size: #offMeshConCount]
0 = Travel only from endpoint A to endpoint B.<br >#DT_OFFMESH_CON_BIDIR = Bidirectional travel.

public unsigned char const * * GetPtrToOffMeshConDir()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToOffMeshConDir() **uint8 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToOffMeshConDir(wrap_this)
	go_out := (**uint8)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
User defined flags assigned to the off-mesh connections. [Size: #offMeshConCount]

public unsigned short const * * GetPtrToOffMeshConFlags()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToOffMeshConFlags() **uint16 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToOffMeshConFlags(wrap_this)
	go_out := (**uint16)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
Off-mesh connection radii. [Size: #offMeshConCount] [Unit: wu]

public float const * * GetPtrToOffMeshConRad()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToOffMeshConRad() **float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToOffMeshConRad(wrap_this)
	go_out := (**float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The user defined ids of the off-mesh connection. [Size: #offMeshConCount]

public unsigned int const * * GetPtrToOffMeshConUserID()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToOffMeshConUserID() **uint32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToOffMeshConUserID(wrap_this)
	go_out := (**uint32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
Off-mesh connection vertices. [(ax, ay, az, bx, by, bz) * #offMeshConCount] [Unit: wu]

public float const * * GetPtrToOffMeshConVerts()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToOffMeshConVerts() **float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToOffMeshConVerts(wrap_this)
	go_out := (**float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The user defined area ids assigned to each polygon. [Size: #polyCount]

public unsigned char const * * GetPtrToPolyAreas()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToPolyAreas() **uint8 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToPolyAreas(wrap_this)
	go_out := (**uint8)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
Number of polygons in the mesh. [Limit: >= 1]

public int * GetPtrToPolyCount()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToPolyCount() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToPolyCount(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The user defined flags assigned to each polygon. [Size: #polyCount]

public unsigned short const * * GetPtrToPolyFlags()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToPolyFlags() **uint16 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToPolyFlags(wrap_this)
	go_out := (**uint16)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The polygon data. [Size: #polyCount * 2 * #nvp]

public unsigned short const * * GetPtrToPolys()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToPolys() **uint16 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToPolys(wrap_this)
	go_out := (**uint16)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The tile's layer within the layered destination mesh. [Limit: >= 0] (Along the y-axis.)

public int * GetPtrToTileLayer()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToTileLayer() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToTileLayer(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The tile's x-grid location within the multi-tile destination mesh. (Along the x-axis.)

public int * GetPtrToTileX()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToTileX() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToTileX(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The tile's y-grid location within the multi-tile destination mesh. (Along the z-axis.)

public int * GetPtrToTileY()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToTileY() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToTileY(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The user defined id of the tile.

public unsigned int * GetPtrToUserId()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToUserId() *uint32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToUserId(wrap_this)
	go_out := (*uint32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The number vertices in the polygon mesh. [Limit: >= 3]

public int * GetPtrToVertCount()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToVertCount() *int32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToVertCount(wrap_this)
	go_out := (*int32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The polygon mesh vertices. [(x, y, z) * #vertCount] [Unit: vx]

public unsigned short const * * GetPtrToVerts()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToVerts() **uint16 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToVerts(wrap_this)
	go_out := (**uint16)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The agent maximum traversable ledge. (UpDown) [Unit: wu]

public float * GetPtrToWalkableClimb()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToWalkableClimb() *float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToWalkableClimb(wrap_this)
	go_out := (*float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The agent height. [Unit: wu]

public float * GetPtrToWalkableHeight()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToWalkableHeight() *float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToWalkableHeight(wrap_this)
	go_out := (*float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
The agent radius. [Unit: wu]

public float * GetPtrToWalkableRadius()
*/
func (p DtNavMeshCreateParamsPtr) GetPtrToWalkableRadius() *float32 {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_GetPtrToWalkableRadius(wrap_this)
	go_out := (*float32)(unsafe.Pointer(wrap_out))
	return go_out
}

/*
dtNavMeshCreateParams * IndexArray(long n)
*/
func (p DtNavMeshCreateParamsPtr) IndexArray(n int) uintptr {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_dtNavMeshCreateParams_IndexArray(wrap_this, C.long(n))
	go_out := uintptr(wrap_out)
	return go_out
}

/*
Builds navigation mesh tile data from the provided tile creation data.

	detour

@param params Tile creation data.
@param outData The resulting tile data.
@param outDataSize The size of the tile data array.
@return True if the tile data was successfully created.

bool dtCreateNavMeshData(dtNavMeshCreateParams * params, unsigned char * * outData, int * outDataSize)
*/
func DtCreateNavMeshData(params DtNavMeshCreateParamsPtr, outData **uint8, outDataSize *int32) bool {
	var wrap_arg_params unsafe.Pointer
	var wrap_arg_outData unsafe.Pointer
	var wrap_arg_outDataSize unsafe.Pointer
	wrap_arg_params = (unsafe.Pointer)(params)
	wrap_arg_outData = (unsafe.Pointer)(outData)
	wrap_arg_outDataSize = (unsafe.Pointer)(outDataSize)
	wrap_out := C.nav_dtCreateNavMeshData(wrap_arg_params, wrap_arg_outData, wrap_arg_outDataSize)
	go_out := bool(wrap_out)
	return go_out
}

/*
Swaps endianness of the tile data.

@param data The tile data array.
@param dataSize The size of the data array.

bool dtNavMeshDataSwapEndian(unsigned char * data, int const dataSize)
*/
func DtNavMeshDataSwapEndian(data *uint8, dataSize int32) bool {
	var wrap_arg_data unsafe.Pointer
	var wrap_arg_dataSize C.int
	wrap_arg_data = (unsafe.Pointer)(data)
	wrap_arg_dataSize = (C.int)(dataSize)
	wrap_out := C.nav_dtNavMeshDataSwapEndian(wrap_arg_data, wrap_arg_dataSize)
	go_out := bool(wrap_out)
	return go_out
}

/*
Swaps the endianness of the tile data's header (#dtMeshHeader).

@param data The tile data array.
@param dataSize The size of the data array.

bool dtNavMeshHeaderSwapEndian(unsigned char * data, int const dataSize)
*/
func DtNavMeshHeaderSwapEndian(data *uint8, dataSize int32) bool {
	var wrap_arg_data unsafe.Pointer
	var wrap_arg_dataSize C.int
	wrap_arg_data = (unsafe.Pointer)(data)
	wrap_arg_dataSize = (C.int)(dataSize)
	wrap_out := C.nav_dtNavMeshHeaderSwapEndian(wrap_arg_data, wrap_arg_dataSize)
	go_out := bool(wrap_out)
	return go_out
}

/*
dtNavMeshCreateParams * NewDtNavMeshCreateParamsPtrArray(long n)
*/
func NewDtNavMeshCreateParamsPtrArray(n int) cgo.GoManagedPtr[cgo.Array[DtNavMeshCreateParamsPtr]] {
	wrap_out := C.nav_NewDtNavMeshCreateParamsPtrArray(C.long(n))
	go_out := cgo.MakePtr[cgo.GoManagedPtr[cgo.Array[DtNavMeshCreateParamsPtr]]](uintptr(wrap_out))
	return go_out
}
